<?php

namespace app\controller\manager;

use app\BaseController;
use app\model\Academy;
use app\model\Clase;
use app\model\Teacher;
use app\model\Student;
use app\model\Course;
use app\model\Major;


class Dashboard extends BaseController
{
    function dashboard()
    {
        $teacherNumber = Teacher::count();
        $studentNumber = Student::count();
        $courseNumber = Course::count();
        $claseNumber = Clase::count();
        $academyNumber = Academy::count();
        $majorNumber = Major::count();
        return resultSuccess(
            [
                'countNumber' => [
                    'teacherNumber' => $teacherNumber,
                    'studentNumber' =>    $studentNumber,
                    'courseNumber' =>   $courseNumber,
                    'claseNumber' =>  $claseNumber,
                    'academyNumber' => $academyNumber,
                    'majorNumber' => $majorNumber,
                ]
            ]
        );
    }
}
